< previous page page_510 next page >

Page 510
e10a6a0a59f035e870d90cca05b85fce.gif
    ByVal degree_u As Integer, ByVal degree_v As Integer, _
    ByVal gap_u As Single, ByVal gap_v As Single, _
    ByVal d_u As Single, ByVal d_v As Single)
Dim u As Single
Dim v As Single
Dim stopu As Single
Dim stopv As Single
Dim X As Single
Dim Y As Single
Dim Z As Single
Dim x1 As Single
Dim y1 As Single
Dim z1 As Single
Dim pline As Polyline3d

    DegreeU = degree_u
    DegreeV = degree_v
    GapU = gap_u
    GapV = gap_v
    Du = d_u
    Dv = d_v

    Set Polylines = New Collection

    ' Create curves with constant u.
    stopu = MaxU - DegreeU + 2 + GapU / 10
    stopv = MaxV - DegreeV + 2 + Dv / 10
    For u = 0 To stopu Step GapU
        Set pline = New Polyline3d
        Polylines.Add pline

        SurfaceValue u, 0, x1, y1, z1

        For v = Dv To stopv Step Dv
            SurfaceValue u, v, X, Y, Z
            pline.AddSegment x1, y1, z1, X, Y, Z
            x1 = X
            y1 = Y
            z1 = Z
        Next v
    Next u

    ' Create curves with constant v.
    stopv = MaxV - DegreeV + 2 + GapV / 10
    stopu = MaxU - DegreeU + 2 + Du / 10
    For v = 0 To stopv Step GapV
        Set pline = New Polyline3d
        Polylines.Add pline

        SurfaceValue 0, v, x1, y1, z1
        For u = Du To stopu Step Du

 
< previous page page_510 next page >